import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
  redirect:"/home"
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    redirect:"/jichu",
    children:[
      {
        path:"/tushu",
        name: 'tushu',
        component: () => import('../views/tushu/tushu.vue'),
      },  {
        path:"/guoji",
        name: 'guoji',
        component: () => import('../views/guoji/guoji.vue'),
      },
      {
        path:"/jichu",
        name: 'jichu',
        component: () => import('../views/jichu/jichu.vue'),
      },
      {
        path:"/xuan",
        name: 'xuan',
        component: () => import('../views/xuan/xuan.vue'),
      }
    ]
  }
]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
export default router